<?php

use yii\helpers\Html;
use yii\widgets\DetailView;


$this->title = '合同详情';
$this->params['breadcrumbs'][] = ['label' => '合同列表', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<style type="text/css">
    .content-view{padding:10px 20px;margin-top:5px; border:1px solid #d2d6de}  
    .view-one{margin-top: 5px;}  
</style>

<div class="contract-view">

    <div class="box">
        <div class="box-header">
            
        </div>

         <div class="box-body"> 
            <div class="content-view">

                <div class="row view-one">
                    <div class="col-md-3">
                        <label>合同编号：</label><?=$model->code?>
                    </div>
                    <div class="col-md-3">
                        <label>创建人：</label><?=$model->userName?>
                    </div>
                    <div class="col-md-3">
                        <label>状态：</label><?=isset(Yii::$app->params['contract_status'][$model->status])?Yii::$app->params['contract_status'][$model->status]:''?>
                    </div>
                </div>

                <div class="row view-one">
                    <div class="col-md-3">
                        <label>客户名称：</label><?=$model->customer->name?>
                    </div>
                    <div class="col-md-3">
                        <label>销售员：</label><?=$model->saleName?>
                    </div> 
                    <div class="col-md-3">
                        <label>合同币种：</label>
                        <?=isset(Yii::$app->params['currency_type'][$model->sale_currency])?Yii::$app->params['currency_type'][$model->sale_currency]:''?>
                    </div>
                    <div class="col-md-3">
                        <label>合同金额：</label><?=$model->sale_price?>
                    </div> 
                </div>

            </div>

            <div class="content-view">
                <div class="row view-one">
                    <div class="col-md-3">
                        <label>收款方式：</label><?=$model->payment_type?>
                    </div>
                    <div class="col-md-3">
                        <label>收款币种：</label>
                        <?=isset(Yii::$app->params['currency_type'][$model->pay_currency])?Yii::$app->params['currency_type'][$model->pay_currency]:''?>
                    </div> 
                    <div class="col-md-3">
                        <label>收款金额：</label><?=$model->pay_price?>
                    </div>
                </div>

                <div class="row view-one">
                    <div class="col-md-3">
                        <label>差额币种：</label>
                        <?=isset(Yii::$app->params['currency_type'][$model->exchange_currency])?Yii::$app->params['currency_type'][$model->exchange_currency]:''?>
                    </div>
                    <div class="col-md-3">
                        <label>汇兑差额：</label><?=$model->exchange_price?>
                    </div> 
                    <div class="col-md-3">
                        <label>快递号：</label><?=$model->express_num?>
                    </div>
                </div>
            </div>

            <div class="content-view">
                <div class="row view-one">
                    <div class="col-md-3">
                        <label>是否开票：</label>
                        <?=isset(Yii::$app->params['confirm'][$model->is_invoice])?Yii::$app->params['confirm'][$model->is_invoice]:''?>
                    </div>
                    <div class="col-md-3">
                        <label>开票日期：</label><?=$model->invoice_date?>
                    </div> 
                    <div class="col-md-3">
                        <label>开票号：</label><?=$model->invoice_no?>
                    </div>
                </div>

                <div class="row view-one">
                    <div class="col-md-3">
                        <label>开票公司：</label><?=$model->invoice_company?>
                    </div>
                    <div class="col-md-3">
                        <label>开票币种：</label>
                        <?=isset(Yii::$app->params['currency_type'][$model->invoice_currency])?Yii::$app->params['currency_type'][$model->invoice_currency]:''?>
                    </div> 
                    <div class="col-md-3">
                        <label>开票金额：</label><?=$model->invoice_price?>
                    </div>
                </div>
            </div>

            <div class="content-view">
                <div class="row view-one">
                    <div class="col-md-3">
                        <label>是否回款：</label>
                        <?=isset(Yii::$app->params['confirm'][$model->is_back])?Yii::$app->params['confirm'][$model->is_back]:''?>
                    </div>
                    <div class="col-md-3">
                        <label>回款日期：</label><?=$model->back_date?>
                    </div> 
                    <div class="col-md-3">
                        <label>回款公司：</label><?=$model->back_company?>
                    </div>
                </div>

                <div class="row view-one">
                    <div class="col-md-3">
                        <label>回款币种：</label>
                        <?=isset(Yii::$app->params['currency_type'][$model->back_currency])?Yii::$app->params['currency_type'][$model->back_currency]:''?>
                    </div>
                    <div class="col-md-3">
                        <label>回款金额：</label><?=$model->back_price?>
                    </div> 
                </div>
            </div>


        </div>      
    </div>

</div>
